package com.ihr360.payroll.dao;

import com.ihr360.payroll.model.dto.batch.BatchExecuatorStatus;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.CrudRepository;


public interface BatchExecuatorStatusRepository extends CrudRepository<BatchExecuatorStatus,String>{
    @Modifying
    @Query(value = "delete from BATCH_EXECUATOR_STATUS where updateDate<timestamp(DATE_SUB(NOW(), INTERVAL 60 SECOND))",nativeQuery = true)
    Integer clearOutdateExecuator();
}